package org.wanda.pv.model.hy;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.nutz.dao.entity.annotation.*;
import org.nutz.json.Json;
import org.wanda.pv.framework.base.BaseModel;

import java.io.Serializable;
@Table("hy_user_info")
public class HyUserInfo extends BaseModel{
    @Column
    @Id
    @Prev(els = {@EL("$me.idGen()")})
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    @Column
    private String hyUserId;
    @Column
    private String name;
    @Column
    private String loginName;
    @Column
    private String email;
    @Column
    private String mobile;
    @Column("hy_role_id")
    private String hyRoleId;
    @Column
    private String age;
    @Column
    private String education;
    @Column
    private String workTime;
    @Column
    private String namespace;
    @Column("hy_office_id")
    private String hyOfficeId;
    @Column("hy_key")
    private String key;
    @Column
    private String userType;
    @Column
    private String photo;
    @Column
    private String sign;
    @Column
    private String createdAt;
    @Column
    private String remarks;

    @Column("hy_project_info_id")
    private String hyProjectInfoId;

    @One(field = "hyOfficeId")
    private HyOffice hyOffice;

    @One(field = "hyRoleId")
    private HyRole hyRole;

    @One(field = "hyProjectInfoId")
    private HyProjectInfo hyProjectInfo;


    public String getHyProjectInfoId() {
        return hyProjectInfoId;
    }

    public void setHyProjectInfoId(String hyProjectInfoId) {
        this.hyProjectInfoId = hyProjectInfoId;
    }

    public HyProjectInfo getHyProjectInfo() {
        return hyProjectInfo;
    }

    public void setHyProjectInfo(HyProjectInfo hyProjectInfo) {
        this.hyProjectInfo = hyProjectInfo;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getHyUserId() {
        return hyUserId;
    }

    public void setHyUserId(String hyUserId) {
        this.hyUserId = hyUserId;
    }

    public HyRole getHyRole() {
        return hyRole;
    }

    public void setHyRole(HyRole hyRole) {
        this.hyRole = hyRole;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getEducation() {
        return education;
    }

    public void setEducation(String education) {
        this.education = education;
    }

    public String getWorkTime() {
        return workTime;
    }

    public void setWorkTime(String workTime) {
        this.workTime = workTime;
    }

    public String getNamespace() {
        return namespace;
    }

    public void setNamespace(String namespace) {
        this.namespace = namespace;
    }

    public String getHyRoleId() {
        return hyRoleId;
    }

    public void setHyRoleId(String hyRoleId) {
        this.hyRoleId = hyRoleId;
    }

    public String getHyOfficeId() {
        return hyOfficeId;
    }

    public void setHyOfficeId(String hyOfficeId) {
        this.hyOfficeId = hyOfficeId;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(String createdAt) {
        this.createdAt = createdAt;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
    @Override
    public String toString() {
        return String.format("/*%s*/%s", super.toString(), Json.toJson(this, org.nutz.json.JsonFormat.compact()));
    }

    public HyOffice getHyOffice() {
        return hyOffice;
    }

    public void setHyOffice(HyOffice hyOffice) {
        this.hyOffice = hyOffice;
    }
}
